/*
 * @Author: huang liang miao 1127255342@qq.com
 * @Date: 2024-11-22 16:06:04
 * @LastEditors: huang liang miao 1127255342@qq.com
 * @LastEditTime: 2025-01-08 08:05:45
 * @FilePath: \dcy-webd:\webCode\dcyCode\scientific_research_manager_web\src\api\resultsManagement\assessmentReward\index.ts
 * @Description: 考核与奖励,成果
 */

import request from '@/utils/request'

import {
  AchvCheckResulDetailReqOpenDTO,
  AchvCheckDetailResultVO,
  AchvInfoDetailVO,
} from './type'


// 个人积分/奖励 详情
export function getCheckResultDetail(data: AchvCheckResulDetailReqOpenDTO) {
  return request<AchvCheckDetailResultVO>({
    url: '/achv/common/checkResultDetail',
    method: 'post',
    data
  })
}

// 成果详情
export function getResultDetailReq(data: {id: string}) {
  return request<AchvInfoDetailVO>({
    url: '/achv/common/detail',
    method: 'post',
    data
  })
}


// 更新考核分、奖励分
/**
  * 主键ID：id
 * 是否是奖励分：rewardFlag
 * 分数：score
 */
export function updateScoreReq(data: {id: string, rewardFlag: boolean, score: number}) {
  return request({
    url: '/achv/common/updateScore',
    method: 'post',
    data
  })
}